home *** CD-ROM | disk | FTP | other *** search
/ Acorn Risc Technologies StrongARM CD-ROM / Acorn Risc Technologies StrongARM CD-ROM.iso / ftp / documents / appnotes / 016_030 / 016c / Text
Encoding:
Text File  |  1993-08-02  |  7.0 KB  |  157 lines

  1. -----------------------------------------------------------------------------
  2. 6th July 1992
  3. -----------------------------------------------------------------------------
  4. Support Group Application Note
  5. Number: 016
  6. Issue: 1
  7. Author:
  8. -----------------------------------------------------------------------------
  9.  
  10. Acorn Electron Screen Displays
  11.  
  12. -----------------------------------------------------------------------------
  13. Applicable Hardware: Acorn Electron
  14.  
  15. Related Application Notes:
  16.  
  17.  
  18. -----------------------------------------------------------------------------
  19. Copyright (C) Acorn Computers Limited 1992
  20.  
  21. Every effort has been made to ensure that the information in this leaflet is 
  22. true and correct at the time of printing. However, the products described in
  23. this leaflet are subject to continuous development and improvements and
  24. Acorn Computers Limited reserves the right to change its specifications at
  25. any time. Acorn Computers Limited cannot accept liability for any loss or
  26. damage arising from the use of any information or particulars in this
  27. leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
  28. Limited.
  29. -----------------------------------------------------------------------------
  30. Support Group
  31. Acorn Computers Limited
  32. Acorn House
  33. Vision Park
  34. Histon
  35. Cambridge       CB4 4AE
  36. -----------------------------------------------------------------------------
  37.  
  38. Acorn Electron Microcomputers are set to display within the full picture
  39. area defined by the PAL TV standard.  This makes maximum use of the display
  40. area and resolution available on a TV set, and is particularly important
  41. when using a monitor.
  42.  
  43. However, some TV manufacturers have changed their policy with regard to
  44. setting up TV pictures, and now adjust sets so that the top of the picture
  45. is "off screen".  This may mean that, when connected to your computer, you
  46. may not see the top line of characters on the screen.  If you have this
  47. problem, you will usually find that TV retailers or rental companies will
  48. adjust you set for you, either free of charge or for a small fee.
  49.  
  50. Most software authors are aware of this problem, and should write their
  51. programs so that you do not lose important information.  If you find a
  52. commercially available program (eg a game) which exhibits this problem, we
  53. suggest that you contact the software authors.
  54.  
  55. For your own use, a simple way around the problem which does not require
  56. adjusting your TV set is to use the text window facility, which is described
  57. on page 92 of the Electron User Guide.  This restricts text output to a
  58. specific area of the screen, which can be set to exclude the top and/or
  59. bottom lines.  Note that this method will not work for games or other
  60. commercial software:  you will need to contact the authors and make them
  61. aware of the problem.
  62.  
  63. The command used depends on which screen mode is in use.  After switching
  64. on, the Electron is in mode 6.  Entering the following command will ensure
  65. that no further text is printed on the top line:
  66.  
  67.         VDU 28,0,24,39,1
  68.  
  69. A VDU 28 command should be entered every time the Electron is switched on,
  70. or whenever the mode is changed (by a MODE command).  The commands for each
  71. screen mode are listed below:
  72.  
  73.         MODE    COMMAND
  74.         0       VDU 28,0,31,79,1
  75.         1       VDU 28,0,31,39,1
  76.         2       VDU 28,0,31,19,1
  77.         3       VDU 28,0,24,79,1
  78.         4       VDU 28,0,31,39,1
  79.         5       VDU 28,0,31,19,1
  80.         6       VDU 28,0,24,39,1
  81.  
  82. These commands may be placed in a program (eg straight after a MODE
  83. statement), or may be entered directly at the keyboard. 
  84.  
  85. If you are likely to change mode a lot, it may be useful to set up the
  86. function keys so that you can accomplish changing the mode and setting the
  87. window with a single key press.  If you enter and then SAVE the following
  88. program, you can automatically set up the function keys just by CHAINing the
  89. program when you switch on the Electron.  Once this program has been run,
  90. pressing (for example) FUNC-2 will select mode 2 and will automatically set
  91. up the text window.  (FUNC-2 is obtained by holding down the FUNC key and
  92. then pressing and releasing "2").
  93.  
  94. Note that the "|" character is obtained by holding down SHIFT and pressing
  95. the "right arrow" key. 
  96.  
  97.  
  98.         10  *KEY 0 MODE 0 |M VDU 28,0,31,79,1 |M
  99.         20  *KEY 1 MODE 1 |M VDU 28,0,31,39,1 |M
  100.         30  *KEY 2 MODE 2 |M VDU 28,0,31,19,1, |M
  101.         40  *KEY 3 MODE 3 |M VDU 28,0,24,79,1 |M
  102.         50  *KEY 4 MODE 4 |M VDU 28,0,31,39,1 |M
  103.         60  *KEY 5 MODE 5 |M VDU 28,0,31,19,1 |M
  104.         70  *KEY 6 MODE 6 |M VDU 28,0,24,39,1 |M
  105.  
  106. If you wish to use the text window in other ways, the general form of the
  107. VDU command is as follows:
  108.  
  109.         VDU 28,a,b,c,d
  110.  
  111.         where:  a is the left hand column number (starting at 0)
  112.                 b is the bottom row number (starting with row 0 at the top)
  113.                 c is th e right hand column number
  114.                 d is the top row number
  115.        of the area on the screen where text is to be displayed.
  116.  
  117. After a VDU 28 command, text will only be printed inside the area specified. 
  118. See page 92 and page 112 of the Electron User Guide for further details.  By
  119. using a different number for "b", it is possible to remove the bottom line
  120. of the display as well.
  121.  
  122. The *KEY command and function keys are described in chapter 24 of the
  123. Electron User Guide.
  124.  
  125. Electron Television Display
  126.  
  127. When using a television set with an Acorn Electron computer you may find
  128. that the top lines of the screen image are not displayed.  The commands
  129. shown below can be used as a "one off" or incorporated into a procedure and
  130. called up when a complete picture is displayed on the screen.  This problem
  131. can then be easily overcome.
  132.  
  133. Using VDU 11 (CTRL K) will move the screen down one line if the text cursor
  134. is positioned somewhere on the top line of the screen.  If the cursor is not
  135. already positioned there, this can be achieved by using the command VDU 30
  136. (CTRL . immediately prior to the VDU 11 command.  this has the effect of
  137. homing the text cursor to the top left hand corner of the screen, therefore
  138. ensuring that the VDU 11 command has the desired effect.
  139.  
  140. Having carried out this operation the text cursor is now left at the top of
  141. the screen and all text will be printed at that position.  This problem can
  142. be overcome by using the following statement instead:
  143.  
  144.         A=POS : B=VPOS-1 : VDU 30,11 : P.TAB (A,B)
  145.  
  146. The variables POS and VPOS contain the X,Y co-ordinates of the text cursor's
  147. present screen position.  Having "remembered" your current screen position
  148. you can then use the VDU 30,11 command to move the screen display down one
  149. line.  Having moved the image down the screen it is then possible, with the
  150. P.TAB (A,B) command, to return to your original position.  You do in fact
  151. return to the same point on the X axis but one line up on the Y axis
  152. "B=VPOS-1".  this enables you to return "physically" to the same point you
  153. left, rather than the point in the text.  This is only really necessary if
  154. your original position was on the bottom line of the screen, as returning to
  155. that position in the text would require moving to a position off the bottom
  156. of the screen.
  157.